/**
 * @param {number[]} numList
 * @param {number} target
 * @return {number[]}
 */
var twoSum = function (numList, target) {
  let result = [];
  for (let i = 0; i < numList.length; i++) {
    if (result.length != 0) break;
    for (let j = i + 1; j < numList.length; j++) {
      if (result.length != 0) break;
      if (numList[i] + numList[j] === target) result = [i, j];
    }
  }
  return result;
};
